/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package elaborate.h2x.transform.position.schema.state;

import java.util.ArrayList;
import java.util.List;
import juixb.schema.ElementNode;

/**
 *
 * @author lendle
 */
public class DefaultElementStateImpl extends DefaultStateImpl implements ElementState{

    protected ElementNode elementNode;
    protected List<Transition> transitions = new ArrayList<Transition>();

    /**
     * Get the value of transitions
     *
     * @return the value of transitions
     */
    public List<Transition> getTransitions() {
        return new ArrayList<Transition>(transitions);
    }

    /**
     * Set the value of transitions
     *
     * @param transitions new value of transitions
     */
    public void setTransitions(List<Transition> transitions) {
        this.transitions.clear();
        this.transitions.addAll(transitions);
    }


    /**
     * Get the value of elementNode
     *
     * @return the value of elementNode
     */
    public ElementNode getElementNode() {
        return elementNode;
    }

    /**
     * Set the value of elementNode
     *
     * @param elementNode new value of elementNode
     */
    public void setElementNode(ElementNode elementNode) {
        this.elementNode = elementNode;
    }

    public void addTransition(Transition transition) {
        this.transitions.add(transition);
    }

    @Override
    public String toString() {
        return elementNode.getDisplayName();
    }
    
    
}
